import SvgIcon from '@/components/SvgIcon/index.vue';
import Category from '@/components/Category/index.vue';
import { type App, type Component } from 'vue';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

const allGlobalComponent: Record<string, Component> = { SvgIcon, Category };

export default {
  install(app: App) {
    for (let key in allGlobalComponent) {
      app.component(key, allGlobalComponent[key]);
    }
    //element-plus图标全局引入
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component);
    }
  },
};
